package com.xiaomaoguai.observer.pull;

/**
 * @ FileName: ConcreteSubject.java
 * @ Author: WeiHui-Z
 * @ Date: 2017/4/25 14:19
 * @ Version: v1.0.0
 */
public class ConcreteSubject extends Subject {

    private String state;

    public String getState() {
        return state;
    }

    public void change(String newState) {
        state = newState;
        System.out.println("主题状态为：" + state);
        //状态发生改变，通知各个观察者
        this.notifyObservers();
    }
}
